<?php

/*
	This file is part of Mandragon.

    Mandragon is free software: you can redistribute it and/or modify
    it under the terms of the GNU General Public License as published by
    the Free Software Foundation, either version 3 of the License, or
    (at your option) any later version.

    Mandragon is distributed in the hope that it will be useful,
    but WITHOUT ANY WARRANTY; without even the implied warranty of
    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
    GNU General Public License for more details.

    You should have received a copy of the GNU General Public License
    along with Mandragon.  If not, see <http://www.gnu.org/licenses/>.
*/

require_once 'PHPUnit/Framework.php';
require_once 'autoload.php';

class TestItemType extends PHPUnit_Framework_TestCase {
	function test_get_type_string() {
		$type = new ItemType();

		$this->assertEquals("topic", $type->get_type_string(ItemType::Topic));
		$this->assertEquals("article", $type->get_type_string(ItemType::Article));
		$this->assertEquals("link", $type->get_type_string(ItemType::WebLink));
		$this->assertEquals("download", $type->get_type_string(ItemType::Download));
		$this->assertEquals("poll", $type->get_type_string(ItemType::Poll));
		$this->assertEquals("news", $type->get_type_string(ItemType::News));
		$this->assertEquals("gallery", $type->get_type_string(ItemType::Gallery));
		$this->assertEquals("ad", $type->get_type_string(ItemType::Ad));
		$this->assertEquals("event", $type->get_type_string(ItemType::Event));
		$this->assertEquals("fiche", $type->get_type_string(ItemType::Fiche));
	}
}


?>
